package com.itheima.stream;

import java.util.ArrayList;
import java.util.Collections;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Stream;

public class StreamDemo03 {
    public static void main(String[] args) {
        //单列集合
        ArrayList<String> arrayList = new ArrayList<>();
        Collections.addAll(arrayList,
                "张三","张三丰","张翠山",
                "王二麻子","张良","谢广坤");

//        arrayList.stream().filter(new Predicate<String>() {
//            @Override
//            public boolean test(String s) {
//                return s!=null;
//            }
//        }).forEach(new Consumer<String>() {
//            @Override
//            public void accept(String s) {
//                System.out.println(s);
//            }
//        });


    }
}
